<?php include 'application/views/header.php' ?>
<h4 class="page-title">Người dùng</h4>
<div class="flash-message"><?php echo $this->session->flashdata('message') ?></div>
<form accept="<?php echo base_url() ?>user/edit/<?php echo $User['UserId'] ?>" 
    accept="" method="post" id="frmPageEdit" enctype="multipart/form-data">
    <table width="100%" class="form page-edit">
       <tr>
            <th>Mã số người dùng</th>
            <td><?php echo $User['UserId'] ?></td>
       </tr>
       <tr>
            <th>Họ tên</th>
            <td><input type="text" value="<?php echo $User['FullName'] ?>" 
                name="FullName" id="FullName"/></td>
       </tr>
       <tr>
            <th>Tài khoản</th>
           <td><input type="text" value="<?php echo $User['UserName'] ?>" 
                name="UserName" id="UserName"/></td>
       </tr>
       <tr>
            <th>Mật khẩu</th>
           <td><input type="password" value="" 
                name="Password" id="Password"/></td>
       </tr>
        <tr>
            <th>Email</th>
           <td><input type="text" value="<?php echo $User['Email'] ?>" 
                name="Email" id="Email"/></td>
       </tr>
       <tr>
            <th>Phone</th>
           <td><input type="text" value="<?php echo $User['Phone'] ?>" 
                name="Phone" id="Phone"/></td>
       </tr>
       <tr>
            <th>Địa chỉ</th>
           <td><input type="text" value="<?php echo $User['Address'] ?>" 
                name="Address" id="Address"/></td>
       </tr>
       <tr>
            <th>Thuộc nhóm</th>
           <td></td>
       </tr>
        <tr>
            <th>Có hiệu lực</th>
            <td><input <?php echo ($User['Enable'] == 1 ? 'checked="checked"' : '') ?>" type="checkbox" value="1" name="Enable" id="Enable"  /></td>
       </tr>
    </table>
    <div class="clr button-set">
        <input type="submit" value="Lưu nội dung" id="btnSave" />
        <input type="reset" value="Hủy nội dung vừa nhập" id="btnReset" />
        <input type="button" value="Về danh sách người dùng" id="btnBack" />
    </div>
</form>
<?php include 'application/views/footer.php' ?>
<script>
$('#btnBack').click(function(){
    window.location.href = '<?php echo base_url() ?>user.html'; 
});
</script>
